package com.example.pandaso.pojo;

import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name = "toplevel")
@XmlAccessorType(XmlAccessType.FIELD)
public class GoogleSearchResult {
    @XmlElement(name = "CompleteSuggestion")
    private List<CompleteSuggestion> completeSuggestions;

    public List<CompleteSuggestion> getCompleteSuggestions() {
        return completeSuggestions;
    }

    public void setCompleteSuggestions(List<CompleteSuggestion> completeSuggestions) {
        this.completeSuggestions = completeSuggestions;
    }

    @XmlAccessorType(XmlAccessType.FIELD)
    public static class CompleteSuggestion {
        @XmlElement(name = "suggestion")
        private Suggestion suggestion;

        public Suggestion getSuggestion() {
            return suggestion;
        }

        public void setSuggestion(Suggestion suggestion) {
            this.suggestion = suggestion;
        }
    }

    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Suggestion {
        @XmlAttribute(name = "data")
        private String data;

        public String getData() {
            return data;
        }

        public void setData(String data) {
            this.data = data;
        }
    }
}
